package com.examples

import com.example.zjx8969.myapplication.beans.Student

object Instance {
    val student = Student("bcd", 12)
}

class StudentInstance {
    val instance: Student
        get() = Instance.student


    companion object {
        val studentInstance: Student by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
            Student("bcd", 13)
        }
    }
}


fun main() {
    StudentInstance().instance
}